<template>
  <el-breadcrumb class="app-breadcrumb" separator="/">
    <el-breadcrumb-item to="/dashboard">首页</el-breadcrumb-item>
    <el-breadcrumb-item v-if="currentRoute.meta && currentRoute.meta.title">
      {{ currentRoute.meta.title }}
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script>
export default {
  name: 'Breadcrumb',
  data() {
    return {
      currentRoute: this.$route
    }
  },
  watch: {
    $route(route) {
      this.currentRoute = route
    }
  }
}
</script>

<style scoped>
.app-breadcrumb {
  margin-bottom: 15px;
  font-size: 14px;
}
</style> 